<!DOCTYPE html>
<!--2015404233吴长猷-->
<html>
    <head>
        <meta charset="UTF-8">
        <title>2015404233吴长猷</title>
        <style type="text/css">
            .ab{
                margin: 0 auto; 
                
            }
            h2{
                text-align: center;
            }
            p{
                text-align: center;
                
            }
            a{
                width: 50px;
                height: 20px;
                line-height:20px;

            }
            

            .ab a{
                background-color: red;
                color: #fff;
                display:block;
                float:left;
                margin:5px 5px;
               
            }
            a:link{
                color:  #fff;
                text-decoration: none;
            }
            a:hover,a:active{
                color: black;
               
            }
        </style>
    </head>

    <body>
        <h2>员工信息列表</h2>
        <p><a href='new.php'>添加新数据</a></p>
        <div class="ab"><table width="637" height="127" border="1" style="margin:0px auto">
                
                
                
            <tbody style="text-align: center">
      
    <tr>
<td width="20">ID</td>
      <td width="100px">姓名</td>
      <td width="100px">所属部门</td>
      <td width="50px">头像</td>
      <td width="150px">出生日期</td>
      <td width="150px">入职时间</td>
      <td width="180px">相关操作</td>
    </tr>
    <tr>
        <?php
                        foreach($rows as $row)   
                        {
			?>
      <td><?php echo $row["e_id"] ?></td>
      <td><?php echo $row["e_name"] ?></td>
      <td><?php echo $row["e_dept"] ?></td>
      <td><img src='<?php echo $row["e_img"]  ?>' alt="" /></td>
      <td><?php echo $row["date_of_birth"]  ?></td>
      <td><?php echo $row["date_of_entry"]  ?></td>
      <td>
          <a href='bbsUpdate.php?id=<?php echo $row["e_id"]  ?>'>编辑</a>&nbsp; 
          <a class="delete" href="javascript:;"  onclick="if(confirm('确定删除吗？')) location.href='bbsDel.php?id=<?php echo $row["e_id"]  ?>'">删除</a>
    </tr>
    
<?php 
                        }
?>
  </tbody>
</table>
        </div>
    </body>
</html>
